package demo3;

import java.io.*;

public class test {
    public static void main(String[] args) {

        try(OutputStream o = new FileOutputStream("d:/mma.txt",true)) {
            File file = new File("d:/mma.txt");
            if(!file.exists()) {
                file.createNewFile();
            }
            String msg = "你好JAVA";
            byte[] bytes = msg.getBytes();
            o.write(bytes);

        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
